package com.example.warehouse.service.serviceImpl;

import com.example.warehouse.entity.Place;
import com.example.warehouse.mapper.PaceMapper;
import com.example.warehouse.service.PaceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@CacheConfig(cacheNames = "com.example.warehouse.service.serviceImpl.PaceServiceImpl")
public class PaceServiceImpl implements PaceService {
    @Autowired
    private PaceMapper paceMapper;

    @Override
    @Cacheable(key = "'all:Place'")
    public List<Place> findAllPlace() {
        return paceMapper.findAllPlace();
    }
}
